import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'


Vue.use(VueRouter)

const router = new VueRouter({
  mode: 'history',

  base:'/lable/',
  routes: [
    {
      path: '/',
<<<<<<< HEAD
      redirect: '/Login'
=======
      redirect: '/login'
>>>>>>> 4f96494e94bced33c9c43a9cb846f89719b8fbbf
    },
    {
      path: '/Login',
      name: 'Login',
      component: Login,
    },

    {
      path: '/Frame',
      name: 'Frame',
      component: () => import('../components/Frame.vue'),
      redirect: '/home',

      children: [
        {
          path: '/home',
          name: 'Home',
          component: () => import('../views/Home.vue')
        },
        {
<<<<<<< HEAD
          path: '/eyeShow',
          name: 'eyeShow',
          component: () => import('../components/eye/Show.vue')
        },
        {
=======
>>>>>>> 4f96494e94bced33c9c43a9cb846f89719b8fbbf
          path: '/eyeUser',
          name: 'eyeUser',
          component: () => import('../components/eye/User.vue')
        },
        {
          path: '/eyeForm',
          name: 'eyeForm',
          component: () => import('../components/eye/Form.vue')
        },
        {
          path: '/eyeFormAll',
          name: 'eyeFormAll',
          component: () => import('../components/eye/FormAll.vue')
        },
        {
          path: '/eyeAll',
          name: 'eyeAll',
          component: () => import('../components/eye/All.vue')
        },
        {
          path: '/eyeRecord',
          name: 'eyeRecord',
          component: () => import('../components/eye/Record.vue')
        },
        {
          path: '/eyeUpload',
          name: 'eyeUpload',
          component: () => import('../components/eye/Upload.vue')
        },
        {
          path: '/eyeTags',
          name: 'eyeTags',
          component: () => import('../components/eye/Tags.vue')
        },
        {
          path: '/eyeLable',
          name: 'eyeLable',
          component: () => import('../components/eye/Lable.vue')
        },
        {
          path: '/eyeFinished',
          name: 'eyeFinished',
          component: () => import('../components/eye/Finished.vue')
        },
        {
          path: '/eyeUnfinished',
          name: 'eyeUnfinished',
          component: () => import('../components/eye/Unfinished.vue')
        },
        {
          path: '/palmUser',
          name: 'palmUser',
          component: () => import('../components/palm/User.vue')
        },
        {
          path: '/palmAll',
          name: 'palmAll',
          component: () => import('../components/palm/All.vue')
        },
        {
          path: '/palmRecord',
          name: 'palmRecord',
          component: () => import('../components/palm/Record.vue')
        },
        {
          path: '/palmUpload',
          name: 'palmUpload',
          component: () => import('../components/palm/Upload.vue')
        },
        {
          path: '/palmTags',
          name: 'palmTags',
          component: () => import('../components/palm/Tags.vue')
        },
        {
          path: '/palmLable',
          name: 'palmLable',
          component: () => import('../components/palm/Lable.vue')
        },
        {
          path: '/palmFinished',
          name: 'palmFinished',
          component: () => import('../components/palm/Finished.vue')
        },
        {
          path: '/palmUnfinished',
          name: 'palmUnfinished',
          component: () => import('../components/palm/Unfinished.vue')
        },
        {
          path: '/tongueUser',
          name: 'tongueUser',
          component: () => import('../components/tongue/User.vue')
        },
        {
          path: '/tongueAll',
          name: 'tongueAll',
          component: () => import('../components/tongue/All.vue')
        },
        {
          path: '/tongueRecord',
          name: 'tongueRecord',
          component: () => import('../components/tongue/Record.vue')
        },
        {
          path: '/tongueUpload',
          name: 'tongueUpload',
          component: () => import('../components/tongue/Upload.vue')
        },
        {
          path: '/tongueTags',
          name: 'tongueTags',
          component: () => import('../components/tongue/Tags.vue')
        },
        {
          path: '/tongueLable',
          name: 'tongueLable',
          component: () => import('../components/tongue/Lable.vue')
        },
        {
          path: '/tongueFinished',
          name: 'tongueFinished',
          component: () => import('../components/tongue/Finished.vue')
        },
        {
          path: '/tongueUnfinished',
          name: 'tongueUnfinished',
          component: () => import('../components/tongue/Unfinished.vue')
        },
      ]
    }
  ]
})


export default router


// 解决vue-router在3.0版本以上重复报错问题
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}